Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(create): invoke correct path when using scoped package #6271

Merged
merged 2 commits into from
Aug 16, 2018

Conversation

fenduru
Copy link
Contributor

@fenduru fenduru commented Aug 14, 2018

Summary

When running yarn create, first the package is installed globally,
however after installing create was attempting to invoke the binary from
within a scope folder that did not exists. The corrects the path
resolution to invoke the binary from the actual place it was installed
to.

fixes #6266

Test plan

This basically just removes the change introduced in #5983. I'm happy to add tests if needed but I'm unsure how to accomplish that.

fenduru and others added 2 commits August 14, 2018 16:30
When running yarn create, first the package is installed globally,
however after installing create was attempting to invoke the binary from
within a scope folder that did not exists. The corrects the path
resolution to invoke the binary from the actual place it was installed
to.

fixes yarnpkg#6266
@arcanis
Copy link
Member

arcanis commented Aug 15, 2018

Looking in more details #5983 I think you're right. The initial issue was making the wrong assumption that Yarn was supposed to install binaries into node_modules/.bin/@scope. The confusion was caused by the @olo/create-ember-app package, which explicitly references the script name as @olo/create-ember-app (with the scope included).

I updated your code to also remove the basename, which I think was the fix we should have done back then (it seems to have been introduced in #3848, which was doing unrelated changes).

@arcanis arcanis merged commit 9a62ef5 into yarnpkg:master Aug 16, 2018
@fenduru
Copy link
Contributor Author

fenduru commented Aug 16, 2018

Awesome thanks @arcanis. Would it be possible to release a patch with this change?

@fenduru
Copy link
Contributor Author

fenduru commented Aug 20, 2018

@arcanis hate to be a pain here, but just wanted to bump to see if we could get a patch of this as we're currently rolling out some tooling that utilizes yarn create at my company

@arcanis
Copy link
Member

arcanis commented Aug 20, 2018

Sure! I'll release a 1.9.5 with this change cherry-picked somewhere this week, friday at the latest 🙂

@fenduru
Copy link
Contributor Author

fenduru commented Sep 4, 2018

@arcanis which friday? ;)

@arcanis
Copy link
Member

arcanis commented Sep 4, 2018

The Friday that's tomorrow? 👼 Sorry for the delay! 😬

@fenduru
Copy link
Contributor Author

fenduru commented Sep 5, 2018

No worries, it happens :)

@arcanis
Copy link
Member

arcanis commented Sep 6, 2018

The 1.10 should be released (as prerelease for now) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn create fails with scoped packages in 1.9.4
2 participants